/**
 * 字典类型接口
 */

import { Get, Post, Delete, Put, RequestParams, ResponseData } from '../../common/decorator'


export default class DictTypeService {

  /**
   * 查询字典类型列表
   * @param res 
   * @returns 
   */
  @Get("/system/dict/type/list", { requestType: 'params' })
  listType(res: object) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }

  // 获取字典类型
  @Get("/system/dict/type/${dictId}", { requestType: 'path' })
  getType(res: { dictId: any }) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }

  // 新增字典类型
  @Post("/system/dict/type", { requestType: 'data' })
  addType(res: object) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }

  // 修改字典类型
  @Put("/system/dict/type", { requestType: 'data' })
  updateType(res: object) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }

  // 删除字典类型
  @Delete("/system/dict/type/${dictId}", { requestType: 'path' })
  delType(res: { dictId: any }) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }

  // 刷新字典缓存
  @Delete("/system/dict/type/refreshCache")
  refreshCache(res: void) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }

  // 获取字典选择框列表
  @Get("/system/dict/type/optionselect")
  optionselect(res: void) {
    const convertedResult: unknown = res as unknown;
    return convertedResult as Promise<ResponseData>
  }


}

